﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="F204_QuanLyHocVien.aspx.cs" Inherits="QuanLyNhanSu_F204_QuanLyHocVien" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
<style type="text/css">
    .Tilehead
    {
        height: 25px;
        background-color: #059;
        color: #fff;
        font-size: 18px;
        padding: 3px 0 0 5px;
        font-weight: bold;
        margin-bottom: 10px;
        margin-top: 10px;
    }
    .dong
    {
        margin: 0;
        padding: 0;
        width: 100%;
        overflow: hidden;
    }
    .input
    {
        width: 50%;
        margin: 10px 0 0 50px;
        overflow: hidden;
        font-size: 11px;
    }
    .tile
    {
        width: 130px;
        float: left;   
        font-weight: bold;
        padding-top: 5px;
    }
    
    .textbox
    {
        margin:0 0 5px 10px;
        float: left; 
        overflow: hidden;       
    }
    .button
    {        
        margin: 20px 0 0 0;
        padding:0 0 0 50px;
        float: left;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <div id="main_content" style="border: 1px solid #222;">
        <div class="Tilehead">Thông tin học viên</div>
        <div class="dong" style="color: Red;"><asp:label id="m_lbl_lois" runat="server" CssClass="cssManField" /></div>
        <div class="dong" >
            <div class="input" style="float: left;">
                <div class="tile">Mã Đối tượng: </div>
                <div class="textbox">
                    <asp:TextBox ID="m_txt_madoituong" runat="server" Width="300px" Enabled="False"></asp:TextBox>
                    </div>
                </div>
           
        </div>
        <div class="dong" >
            <div class="input" style="float: left;">
                <div class="tile">Hoc và tên: </div>
                <div class="textbox"><asp:DropDownList ID="m_cbo_tenhocvien" runat="server" 
                        Width="300px" 
                        onselectedindexchanged="m_cbo_tenhocvien_SelectedIndexChanged" 
                        AutoPostBack="True"></asp:DropDownList></div>
                (*)</div>
            
        </div>
        <div class="dong" >
            <div class="input" style="float: left;">
                <div class="tile">Tên dang nhập: </div>
                <div class="textbox">
                    <asp:TextBox ID="m_txt_tendangnhap" runat="server" Width="300px"></asp:TextBox>
                    </div>
                (*)</div>
           
        </div>
        <div class="dong" >
            <div class="input" style="float: left;">
                <div class="tile">Mật khẩu: </div>
                <div class="textbox">
                    <asp:TextBox ID="m_txt_matkhau" runat="server" Width="300px" TextMode="Password"></asp:TextBox>
                    </div>
                (*)</div>
           
        </div>
        <div class="dong" >
            <div class="input" style="float: left;">
                <div class="tile">Loại học viên: </div>
                <div class="textbox"><asp:DropDownList ID="m_cbo_loaihocvhien" runat="server" 
                        Width="300px"></asp:DropDownList></div>
                (*)</div>
            
        </div>
        
        <div class="dong">
            <div class="button" style="margin:20px 0 0 140px; width: 100px;" > 
                <asp:button id="m_btt_taomoi" 
                            CssClass="cssButton" runat="server" Width="98px" Text="Tạo mới(c)"
                        CausesValidation="false"  Height="25px" 
                    onclick="m_btt_taomoi_Click"  /></div>
            <div class="button"> <asp:button id="m_btt_capnhat" 
                            CssClass="cssButton" runat="server" Width="98px" Text="Cập nhật(u)"
                        CausesValidation="false"  Height="25px" 
                    onclick="m_btt_capnhat_Click" /></div>
            <div class="button"> 
                <asp:button id="m_btt_xoatrang" 
                            CssClass="cssButton" runat="server" Width="98px" Text="Xóa trắng(r)"
                        CausesValidation="false"  Height="25px" onclick="m_btt_xoatrang_Click" 
                    /></div>
        </div>
        <div class="Tilehead">Danh sách học viên</div>
        <div class="dong"><asp:label id="m_lbl_thong_bao" runat="server" CssClass="cssManField" /></div>
         <div class="dong" >
            <div class="input" style="float: left; width: 35%;">
                <div class="tile" style="width: 120px;">Tên Đăng nhập: </div>
                <div class="textbox"><asp:TextBox ID="m_txt_loc_madoituong" runat="server" Width="200px"></asp:TextBox></div>
            </div>           
            <div class="button" style="margin:10px 0 0 0px; width: 100px;" > 
                <asp:button id="m_btt_locdulieu" 
                            CssClass="cssButton" runat="server" Width="98px" Text="Lọc dữ liệu"
                        CausesValidation="false"  Height="25px" 
                    onclick="m_btt_locdulieu_Click"/></div>
        </div>   
        <br /> 
        <div class="dong">
                    <asp:GridView ID="m_grv_dm_hocvien" AllowPaging="True" 
                runat="server" AutoGenerateColumns="False" 
                Width="100%" DataKeyNames="ID" 
                CellPadding="3" AllowSorting="True" BackColor="White" BorderColor="#999999" 
                        BorderStyle="None" BorderWidth="1px" GridLines="Vertical" 
                        onpageindexchanging="m_grv_dm_hocvien_PageIndexChanging" 
                        onrowdeleting="m_grv_dm_hocvien_RowDeleting" 
                        onselectedindexchanging="m_grv_dm_hocvien_SelectedIndexChanging" >            
                  <AlternatingRowStyle BackColor="Gainsboro" />
                <Columns>                  
                     <%--<asp:CommandField SelectText="Sửa" ShowSelectButton="True" />--%>

                    <asp:TemplateField HeaderText="Sửa">
                    <ItemTemplate>
                     <asp:LinkButton ID = "m_lbt_update"  runat="server"
                     CommandName="Update" Text="Sửa" ToolTip="Sửa" CausesValidation="false">
                     </asp:LinkButton>
                    </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Xóa">
                    <ItemTemplate>
                     <asp:LinkButton ID = "m_lbt_delete"  runat="server" CausesValidation="false"
                     CommandName="Delete" Text="Xóa" ToolTip="Xóa" OnClientClick="return confirm ('Bạn có thực sự muốn xóa bản ghi này?')">
                     </asp:LinkButton>
                    </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="STT" ItemStyle-HorizontalAlign="Center">
                       <ItemTemplate><%# Container.DataItemIndex + 1 %></ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="5%"></ItemStyle>
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="Họ và tên">
                         <ItemTemplate>
                             <%# Eval("ID_THANH_VIEN").ToString() %>
                         </ItemTemplate>
                     </asp:TemplateField>
                    <asp:BoundField DataField="TEN_DANG_NHAP" HeaderText="Tên đăng nhập" 
                        ItemStyle-HorizontalAlign="Center" >
                     <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>

                     <asp:TemplateField HeaderText="Loại học viên">
                         <ItemTemplate>
                             <%# Eval("ID_CHUC_VU").ToString() %>
                         </ItemTemplate>
                     </asp:TemplateField>
                </Columns>
                  <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                  <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                  <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                  <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                <SelectedRowStyle CssClass="cssSelectedRow" BackColor="#008A8C" Font-Bold="True" 
                            ForeColor="White"></SelectedRowStyle>
                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                        <SortedAscendingHeaderStyle BackColor="#0000A9" />
                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                        <SortedDescendingHeaderStyle BackColor="#000065" />
            </asp:GridView>            

        </div>
    </div>
</asp:Content>

